#include "stdafx.h"
#include "Object.h"
#include "ObjectManager.h"
#include "message.h"

sgObject * sgObject::Creator()
{
    return new sgObject;
}

bool sgObject::m_creatorRegisted = CObjectManager::Instance().RegisteCreator(OBJ_OBJECT, sgObject::Creator );

sgObject::sgObject()
{
    m_objectID = CObjectManager::Instance().GenerateObjectID();
    m_classType = OBJ_OBJECT;
}

void sgObject::SetID( int id )
{
    m_objectID = id;
}

int sgObject::GetID(  )
{
    return m_objectID;
}

sgObject * sgObject::Clone()
{
    sgObject *ret = new sgObject;
    return ret;
}

void sgObject::ProcessMessage( sgMessage *msg )
{

}

int sgObject::GetClassType()
{
    return m_classType;
}

void sgObject::Serialize( CSerialize& s )
{
    s&std::make_pair(&m_objectID, "ID");
    s&std::make_pair(&m_classType, "Class");
}


